package com.zyd.blog.personal.controller;
import com.zyd.blog.homeart.util.ResponseObject;
import com.zyd.blog.personal.service.LoginService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RestController
public class LoginController {

    @Resource
    private LoginService loginService;

    @PostMapping("login")
    public ResponseObject login(String username,String password){
        return loginService.login(username,password);
    }


    @GetMapping("checkToken")
    public ResponseObject checkToken(String token){
        ResponseObject re = loginService.checkToken(token);
        return new ResponseObject();
    }

}
